//
//  XCHPlay.h
//  视频悬浮框OC
//
//  Created by 解楚豪 on 2018/9/10.
//  Copyright © 2018年 xch. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h>

@interface XCHPlay : NSObject

+(instancetype)shareInstance;

/**
 视频网址
 */
@property (nonatomic, copy) NSString *videoURL;

/**
 是否悬浮框展示
 */
@property (nonatomic) BOOL isSuspend;

/**
 是否全屏
 */
@property (nonatomic) BOOL isFull;


#pragma mark ---------------------视频播放----------------------------
@property (nonatomic, strong) AVPlayer *player;

@property (nonatomic, strong) AVPlayerLayer *playerLayer;

/**
 视频frame
 */
@property (nonatomic) CGRect videoFrame;

/**
 模式
 */
@property (nonatomic) AVLayerVideoGravity videoGravity;

/**
 添加显示图层

 @param view 父视图
 */
-(void)addSupview:(UIView *)view;

/**
 删除
 */
-(void)deleteVideoLayer;

/**
 视频播放
 */
-(void)videoPlay;

/**
 视频暂停
 */
-(void)videoPause;

@end
